#ifndef CType_First
#define CType_First
#ifdef __GNUG__
#pragma interface
#endif

#include "Types.h"
#include "FontEncoding.h"

//---- CType -------------------------------------------------------------------

extern CharInfo _C_Type_[];

#define _CharClass(c,m) ((_C_Type_+1)[(c)].code & (m))

#define Isalpha(c)      _CharClass(c, _U_|_L_)
#define Isupper(c)      _CharClass(c, _U_)
#define Islower(c)      _CharClass(c, _L_)
#define Isdigit(c)      _CharClass(c, _N_)
#define Isxdigit(c)     _CharClass(c, _X_)
#define Isspace(c)      _CharClass(c, _S_)
#define Ispunct(c)      _CharClass(c, _P_)
#define Isalnum(c)      _CharClass(c, _U_|_L_|_N_)
#define Isprint(c)      _CharClass(c, _P_|_U_|_L_|_N_|_B_)
#define Isgraph(c)      _CharClass(c, _P_|_U_|_L_|_N_)
#define Iscntrl(c)      _CharClass(c, _C_)
#define Isascii(c)      _CharClass(c, _A_)
#define Isinword(c)     _CharClass(c, _N_|_L_|_U_|_W_)
#define Iswordwrap(c)   _CharClass(c, _V_)

#define HexValue(c)     ((_C_Type_+1)[c].hexval)

extern char *hexChars;

extern u_char identitymap[256];

#endif
